Descripción |
---|
Crea un sólido barriendo un perfil a lo largo de una trayectoria. Versión macro : 1.0 Fecha última modificación : 2011-12-03 Versión FreeCAD : All Descargar : ToolBar Icon Autor : Normandc |
Autor |
Normandc |
Descargar |
ToolBar Icon |
Enlace |
Macros recipes How to install macros How to customize toolbars |
Versión Macro |
1.0 |
Fecha última modificación |
2011-12-03 |
Versión(es) FreeCAD |
All |
Acceso directo predeterminado |
None |
Ver también |
None |
Esta macro crea un sólido barriendo un perfil 2D a lo largo de una trayectoria previamente seleccionada en la vista 3D. Los elementos 2D se pueden crear con las herramientas habituales de FreeCAD.
El sólido resultante no es paramétrico. Si cambias el perfil o la trayectoria, necesitarás ejecutar la macro de nuevo.
Macro_Solid_Sweep.FCMacro
import Part, FreeCAD, math, PartGui, FreeCADGui from FreeCAD import Base # get the selected objects, with first selection for the trajectory and second for the section s = FreeCADGui.Selection.getSelection() try: shape1=s[0].Shape shape2=s[1].Shape except: print "Wrong selection" traj = Part.Wire([shape1]) section = Part.Wire([shape2]) # create Part objec in the current document myObject=App.ActiveDocument.addObject("Part::Feature","Sweep") # variable makeSolid = 1 to create solid, 0 to create surfaces makeSolid = True #1 isFrenet = True #1 # create a 3D shape and assigh it to the current document Sweep = Part.Wire(traj).makePipeShell([section],makeSolid,isFrenet) myObject.Shape = Sweep
Gracias a Wmayer por su ayuda al escribir esta macro.
Dos ejemplo de uso se pueden ver en este hilo del foro, así como enlaces para descargar archivos FCStd. Utilizando una hélice como trayectoria, un sólido barrido se puede utilizar para crear un tornillo.